<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>16_MVC</title>
		<link href="../CSS/button_Submit_Reset.css" rel="stylesheet" />

		<script src="../JQuery/jquery-3.6.0.min.js"></script>
		<script>

			function byType(){
				$.ajax({
					url:"http://localhost:8081/car/get",
					data:$("#11_form_1").serialize(),
					
					success:function(data){
						$("#11_h5_1").text(JSON.stringify(data));
						console.log("Success!");
					},
					error:function(data){
						$("#11_h5_1").text(JSON.stringify(data));
						console.log("Success!");
					}
				})
			}
			
		</script>

	</head>
	<body>

		<a href="http://localhost:8081/car/get">http://localhost:8081/car/get</a>

		<h5 id="11_h5_1">11_h5_1</h5>
		<form action="#" method="post" id="11_form_1">
			<table>

				<tr>
					<td>
						车类名：<input type="text" name="type" placeholder="请输入车的类名..." />
					</td>
					<td>
						<input type="button" value="提交" onclick="byType();" class="buttonSubmit" />
					</td>
				</tr>
			</table>

		</form>

	</body>
</html>
